import request from '@/utils/request'
//添加系统权限
export function sysPermission_add(data) {
	return request({
		url: '/api/sysPermission/add',
		method: 'post',
		data
	})
}
//修改系统权限
export function sysPermission_update(data) {
	return request({
		url: '/api/sysPermission/update',
		method: 'post',
		data
	})
}
//删除系统权限
export function sysPermission_delete(data) {
	return request({
		url: '/api/sysPermission/delete/' + data.id,
		method: 'post',
		data
	})
}
//系统权限详情
export function sysPermission_info(param) {
	return request({
		url: '/api/sysPermission/info/' + param.id,
		method: 'get',
		param
	})
}
//系统权限分页列表
export function sysPermission_getPageList(data) {
	return request({
		url: '/api/sysPermission/getPageList',
		method: 'post',
		data
	})
}
//获取所有菜单列表
export function sysPermission_getAllMenuList(data) {
	return request({
		url: '/api/sysPermission/getAllMenuList',
		method: 'post',
		data
	})
}
//获取获取菜单树形列表
export function sysPermission_getAllMenuTree(data) {
	return request({
		url: '/api/sysPermission/getAllMenuTree',
		method: 'post',
		data
	})
}
//根据用户id获取菜单列表
export function sysPermission_getMenuListByUserId(data) {
	return request({
		url: '/api/sysPermission/getMenuListByUserId/' + data.id,
		method: 'post',
		data
	})
}
//根据用户id获取菜单树形列表
export function sysPermission_getMenuTreeByUserId(data) {
	return request({
		url: '/api/sysPermission/getMenuTreeByUserId/' + data.id,
		method: 'post',
		data
	})
}
//根据用户id获取该用户所有权限编码
export function sysPermission_getPermissionCodesByUserId(param) {
	return request({
		url: '/api/sysPermission/getPermissionCodesByUserId/' + param.id,
		method: 'get',
		param
	})
}
//根据角色id获取该对应的所有三级权限ID
export function sysPermission_getThreeLevelPermissionIdsByRoleId(param) {
	return request({
		url: '/api/sysPermission/getThreeLevelPermissionIdsByRoleId/' + param.id,
		method: 'get',
		param
	})
}
//获取所有导航菜单(一级/二级菜单)
export function sysPermission_getNavMenuTree(data) {
	return request({
		url: '/api/sysPermission/getNavMenuTree',
		method: 'post',
		data
	})
}
